﻿<UserControl x:Class="Zcu.PanelComposer.Views.ExistingProjectsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <DockPanel LastChildFill="True">
        <Label x:Name="DisplayName" Content="Title" FontSize="16" DockPanel.Dock="Top" />
        
        <Grid DockPanel.Dock="Bottom">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.7*" />
                <ColumnDefinition Width="0.15*" />
                <ColumnDefinition Width="0.15*" />
            </Grid.ColumnDefinitions>
            <Button Grid.Column="1" x:Name="RemoveAction" Content="Remove" />
            <Button Grid.Column="2" x:Name="ActiveAction" Content="Active" />
        </Grid>
        
        <DataGrid x:Name="Project" SelectedItem="{Binding SelectedProject}" AutoGenerateColumns="False" 
                  CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True"
                  Margin="0 0 0 10">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Name of Project" Binding="{Binding DisplayName}" SortMemberPath="DisplayName" Width="*" />
                <DataGridTextColumn Header="Number of floors" Binding="{Binding Floors}" SortMemberPath="Floors" Width="0.2*" />
                <DataGridTextColumn Header="Created date" Binding="{Binding CreatedDate}" SortMemberPath="CreatedDate" Width="0.2*" />
                <DataGridTextColumn Header="Updated date" Binding="{Binding UpdatedDate}" SortMemberPath="UpdatedDate" Width="0.2*" />
            </DataGrid.Columns>
        </DataGrid>
    </DockPanel>
</UserControl>
